package city.spring.modules.material.service;

import city.spring.modules.material.entity.MaterialreceiptapprovalEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import lombok.NonNull;

import java.security.Principal;
import java.util.List;

/**
 * Service：领用审核
 *
 * @author 谢金婷
 * @date 2020-06-26 22:39:08
 */
public interface MaterialreceiptapprovalService extends IService<MaterialreceiptapprovalEntity> {
    String CACHE_NAME = "receiptapproval";

    /**
     * 业务处理：保存一个 <strong>领用审核</strong>
     *
     * @param entity 领用审核
     */
    void saveReceiptapproval(MaterialreceiptapprovalEntity entity, @NonNull Principal user);

    /**
     * 业务处理：修改一个 <strong>领用审核</strong>
     *
     * @param entity 领用审核
     */
    void updateReceiptapproval(MaterialreceiptapprovalEntity entity);

    /**
     * 业务处理：删除一个 <strong>领用审核</strong>
     *
     * @param primaryKey 主键ID
     */
    void deleteReceiptapproval(String primaryKey);

    /**
     * 业务处理：删除多个 <strong>领用审核</strong>
     *
     * @param primaryKeys 主键ID列表
     */
    void deleteReceiptapproval(List<String> primaryKeys);

    void saveReceiptapprovalOcheck(MaterialreceiptapprovalEntity entity, @NonNull Principal user);

    /**
     * 根据领用单查找部门领导审核记录
     *
     * @param receiptId
     * @return
     */
    List<MaterialreceiptapprovalEntity> getCheckByReceiptId(String receiptId);
}